]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/power: Always sync after creating proxy
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 28 Jun 2021 16:31:13 +0000 (18:31 +0200)
committerMarge Bot <marge-bot@gnome.org>
Mon, 28 Jun 2021 20:49:43 +0000 (20:49 +0000)
Otherwise the menu remains in an inconsistent state in case of an
error, until something else triggers a call to _sync() (like a
settings change).

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4431

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1901>

js/ui/status/power.js

index a43eeb65ef3df2f8eb02d68951417c6c01876e63..c79ff798e98af710e1dbfe74a94b70f5517f5195 100644 (file)
@@ -40,10 +40,10 @@ class Indicator extends PanelMenu.SystemIndicator {
             (proxy, error) => {
                 if (error) {
                     log(error.message);
-                    return;
+                } else {
+                    this._proxy.connect('g-properties-changed',
+                        this._sync.bind(this));
                 }
-                this._proxy.connect('g-properties-changed',
-                    this._sync.bind(this));
                 this._sync();
             });